home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 31 / Amiga Format CD31 (1998-09-02)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1998-10].iso / -seriously_amiga- / sound / aplayer / hdinstall < prev    next >
Text File  |  1998-07-16  |  56KB  |  1,762 lines

  1. ;**************************************************************************
  2. ;*                                                                        *
  3. ;*                 Installer Script For Accessible Player                 *
  4. ;*                                                                        *
  5. ;*                             Update 9/6-1997                            *
  6. ;*                                                                        *
  7. ;**************************************************************************
  8.  
  9. ;--------------------------------------------------------------------------
  10. ; Procedures
  11.  
  12. (procedure InstallLib
  13.     (working ("Testing %s" libname))
  14.     (copylib
  15.         (prompt ("Do you want to install the \"%s\"?" libname))
  16.         (help @copylib-help)
  17.         (source (tackon tempdir libname))
  18.         (dest libdest)
  19.         (confirm)
  20.     )
  21. )
  22.  
  23. (procedure DeleteAll
  24.     (if (exists deldir)
  25.         (foreach deldir "#?"
  26.             (delete (tackon deldir @each-name)
  27.                 (optional force)
  28.             )
  29.         )
  30.     )
  31. )
  32.  
  33. ;--------------------------------------------------------------------------
  34. ; ** Install Procedure
  35.  
  36. (procedure Install
  37.     (message "This version of APlayer is shareware. "
  38.              "This is a non-crippled version, but you can still "
  39.              "register if you want to. "
  40.              "On how to register, read the guide.\n\n"
  41.              "If you still want to install press proceed else abort."
  42.     )
  43.  
  44.     (message "You are now about to install the APlayer program. "
  45.              "You will first be asked for all the different files "
  46.              "you can install and then this script will begin to "
  47.              "install the files."
  48.     )
  49.  
  50.     (set default-dest
  51.         (askdir
  52.             (prompt "Where do you want to install APlayer? A drawer called "
  53.                     "APlayer will be created.")
  54.             (help @askdir-help)
  55.             (default @default-dest)
  56.         )
  57.     )
  58.     (set @default-dest default-dest)
  59.  
  60.  
  61.     (set fileflag
  62.         (askoptions
  63.             (prompt "Which files do you want to install in the "
  64.                     "\"APlayer\" drawer?")
  65.             (help @askoptions-help)
  66.             (choices
  67.                 "APlayer"
  68.                 "Commercial Picture"
  69.             )
  70.         )
  71.     )
  72.  
  73.     (set big
  74.         (askbool
  75.             (prompt "Do you want to install all players, noteplayers and "
  76.                     "agents? If you select yes, a default player config "
  77.                     "file will be installed, except if you already have "
  78.                     "a config file installed. Note that all agents will "
  79.                     "be active, so if you don't want them to be active, "
  80.                     "you have to disable them by yourself after the "
  81.                     "installation.")
  82.             (help @askbool-help)
  83.             (choices "Yes" "No")
  84.         )
  85.     )
  86.  
  87.     (if big
  88.         (
  89.             (set play 1)
  90.             (set playflag1 -1)
  91.             (set playflag2 -1)
  92.             (set playflag3 -1)
  93.             (set playflag4 -1)
  94.             (set playflag5 -1)
  95.             (set playflag6 -1)
  96.             (set playflag7 -1)
  97.  
  98.             (set noteplay 1)
  99.             (set noteplayflag1 -1)
  100.  
  101.             (set agentflag 1)
  102.             (set agentflag1 -1)
  103.             (set multiflag1 -1)
  104.         )
  105.         (                               ; else statement
  106.             (set play
  107.                 (askbool
  108.                     (prompt "Do you want to install external players?")
  109.                     (help "If you select yes, you can select between all the "
  110.                           "external players this version support. All the players "
  111.                           "will be stored in your \"LIBS:APlayer\" drawer.")
  112.                 )
  113.             )
  114.  
  115.             (set playflag1 0)
  116.             (set playflag2 0)
  117.             (set playflag3 0)
  118.             (set playflag4 0)
  119.             (set playflag5 0)
  120.             (set playflag6 0)
  121.             (set playflag7 0)
  122.             (if play
  123.                 (
  124.                     (set playflag1
  125.                         (askoptions
  126.                             (prompt "Which external players do you want to install in "
  127.                                     "your \"LIBS:APlayer\" drawer?")
  128.                             (help @askoptions-help)
  129.                             (choices
  130.                                 "Activision Pro"
  131.                                 "Art of Noise"
  132.                                 "Ben Daglish"
  133.                                 "DeliCustom"
  134.                                 "Delta 1.0"
  135.                                 "Delta 2.0"
  136.                                 "Digi Booster"
  137.                                 "Digital Mugician"
  138.                             )
  139.                         )
  140.                     )
  141.  
  142.                     (set playflag2
  143.                         (askoptions
  144.                             (prompt "Which external players do you want to install in "
  145.                                     "your \"LIBS:APlayer\" drawer?")
  146.                             (help @askoptions-help)
  147.                             (choices
  148.                                 "DSS"
  149.                                 "FastTracker"
  150.                                 "FastTracker 2.0"
  151.                                 "Fred"
  152.                                 "Future Composer 1.0-1.3"
  153.                                 "Future Composer 1.4"
  154.                                 "Hippel"
  155.                                 "IFF-8SVX"
  156.                             )
  157.                         )
  158.                     )
  159.  
  160.                     (set playflag3
  161.                         (askoptions
  162.                             (prompt "Which external players do you want to install in "
  163.                                     "your \"LIBS:APlayer\" drawer?")
  164.                             (help @askoptions-help)
  165.                             (choices
  166.                                 "IFF-AIFF"
  167.                                 "IFF-SMUS"
  168.                                 "ImpulseTracker"
  169.                                 "In Stereo 2.0"
  170.                                 "JamCracker"
  171.                                 "J.C. Brooke"
  172.                                 "Maniacs of Noise"
  173.                                 "Mark Cooksey"
  174.                             )
  175.                         )
  176.                     )
  177.  
  178.                     (set playflag4
  179.                         (askoptions
  180.                             (prompt "Which external players do you want to install in "
  181.                                     "your \"LIBS:APlayer\" drawer?")
  182.                             (help @askoptions-help)
  183.                             (choices
  184.                                 "Mark II"
  185.                                 "MultiTracker"
  186.                                 "Music Assembler"
  187.                                 "MusicLine Editor"
  188.                                 "Noise Packer 2.0"
  189.                                 "Noise Packer 3.0"
  190.                                 "OctaMed"
  191.                                 "OctaMed Sound Studio"
  192.                             )
  193.                         )
  194.                     )
  195.  
  196.                     (set playflag5
  197.                         (askoptions
  198.                             (prompt "Which external players do you want to install in "
  199.                                     "your \"LIBS:APlayer\" drawer?")
  200.                             (help @askoptions-help)
  201.                             (choices
  202.                                 "Oktalyzer"
  203.                                 "Puma Tracker"
  204.                                 "Quadra Composer"
  205.                                 "RIFF-WAVE"
  206.                                 "Ron Klaren"
  207.                                 "ScreamTracker 3.0"
  208.                                 "SID"
  209.                                 "SidMon 1.0"
  210.                             )
  211.                         )
  212.                     )
  213.  
  214.                     (set playflag6
  215.                         (askoptions
  216.                             (prompt "Which external players do you want to install in "
  217.                                     "your \"LIBS:APlayer\" drawer?")
  218.                             (help @askoptions-help)
  219.                             (choices
  220.                                 "SidMon 2.0"
  221.                                 "Sound Factory"
  222.                                 "Sound FX 1.3"
  223.                                 "Sound FX 2.0"
  224.                                 "Sound Monitor 2.0"
  225.                                 "StarTrekker 4"
  226.                                 "StarTrekker 4AM"
  227.                                 "Syntracker"
  228.                             )
  229.                         )
  230.                     )
  231.  
  232.                     (set playflag7
  233.                         (askoptions
  234.                             (prompt "Which external players do you want to install in "
  235.                                     "your \"LIBS:APlayer\" drawer?")
  236.                             (help @askoptions-help)
  237.                             (choices
  238.                                 "TFMX 1.5"
  239.                                 "THX Sound System"
  240.                                 "Tronic Tracker"
  241.                                 "Whittaker"
  242.                             )
  243.                         )
  244.                     )
  245.                 )
  246.             )
  247.  
  248.  
  249.             (set noteplay
  250.                 (askbool
  251.                     (prompt "Do you want to install external NotePlayers?")
  252.                     (help "If you select yes, you can select between all the "
  253.                           "external NotePlayers this version support. All the "
  254.                           "NotePlayers will be stored in your \"LIBS:APlayer/NotePlayers\" drawer.")
  255.                 )
  256.             )
  257.  
  258.             (set noteplayflag1 0)
  259.             (if noteplay
  260.                 (
  261.                     (set noteplayflag1
  262.                         (askoptions
  263.                             (prompt "Which external NotePlayers do you want to install in "
  264.                                     "your \"LIBS:APlayer/NotePlayers\" drawer?")
  265.                             (help @askoptions-help)
  266.                             (choices
  267.                                 "14 Bit Stereo - 2 Voices"
  268.                                 "14 Bit Stereo - 32 Voices"
  269.                                 "AHI - 64 Voices"
  270.                                 "FastMem - 4 Voices"
  271.                                 "Mono - 32 Voices"
  272.                                 "Real Surround - 32 Voices"
  273.                                 "Stereo - 32 Voices"
  274.                                 "Surround - 32 Voices"
  275.                             )
  276.                         )
  277.                     )
  278.                 )
  279.             )
  280.  
  281.  
  282.             (set agent
  283.                 (askbool
  284.                     (prompt "Do you want to install external Agents?")
  285.                     (help "If you select yes, you can select between all the "
  286.                           "external Agents this version support. All the "
  287.                           "Agents will be stored in your \"LIBS:APlayer/Agents\" drawer.")
  288.                 )
  289.             )
  290.  
  291.             (set agentflag1 0)
  292.             (if agent
  293.                 (
  294.                     (set agentflag1
  295.                         (askoptions
  296.                             (prompt "Which external Agents do you want to install in "
  297.                                     "your \"LIBS:APlayer/Agents\" drawer?")
  298.                             (help @askoptions-help)
  299.                             (choices
  300.                                 "Favourite Song System"
  301.                                 "Multi - Sample Saver"
  302.                                 "Bar - Scope"
  303.                                 "FreqAnalyzer - Scope"
  304.                                 "RGBBox - Scope"
  305.                                 "SpinSquare - Scope"
  306.                             )
  307.                         )
  308.                     )
  309.  
  310.                     (set multiflag1 0)
  311.                     (if (in agentflag1 1)
  312.                         (
  313.                             (set multiflag1
  314.                                 (askoptions
  315.                                     (prompt "You have selected the Multi-SampleSaver agent. "
  316.                                             "Which sample modules do you want to install?")
  317.                                     (help @askoptions-help)
  318.                                     (choices
  319.                                         "IFF-8SVX"
  320.                                         "IFF-AIFF"
  321.                                         "Raw"
  322.                                         "RIFF-WAVE"
  323.                                         "Worms"
  324.                                     )
  325.                                 )
  326.                             )
  327.                         )
  328.                     )
  329.                 )
  330.             )
  331.         )
  332.     )
  333.  
  334.  
  335.     (set libs
  336.         (askoptions
  337.             (prompt "Which other libraries do you want to install in your "
  338.                     "\"LIBS:\" drawer?  Press help for more info.")
  339.             (help "This is some libraries the APlayer uses or can use. "
  340.                   "Here follow a little description of the different "
  341.                   "libraries:\n\n"
  342.                   "MLine.library: Mline.library is used for playing "
  343.                   "musicline-modules.\n\n"
  344.                   "PlaySID.library: This library are used in the SID "
  345.                   "player. That means, if you want to hear some C64 SID "
  346.                   "tunes, you have to install this library.\n\n"
  347.                   "Reqtools.library: This library is required by APlayer. "
  348.                   "With this library APlayer shows filerequesters etc.\n\n"
  349.                   "Rexxtools.library: If you want ARexx in APlayer, you "
  350.                   "have to install this library. It helps APlayer to make "
  351.                   "the ARexx interface.\n\n"
  352.                   "Xpkmaster.library: APlayer can also use this library to "
  353.                   "decrunch both powerpacked and xpk packed modules.\n\n"
  354.                   "Unpack.library: This library can decrunch a lot of "
  355.                   "different types of crunched modules. See the unpack.doc "
  356.                   "for more information.")
  357.             (choices
  358.                 "MLine.library"
  359.                 "PlaySID.library"
  360.                 "Reqtools.library"
  361.                 "Rexxtools.library"
  362.                 "Xpkmaster.library"
  363.                 "Unpack.library"
  364.             )
  365.         )
  366.     )
  367.  
  368.  
  369.     (set cpu (database "cpu"))
  370.     (if (< cpu 68020)
  371.         (set marked 3)
  372.         (set marked 5)
  373.     )
  374.  
  375.     (set xpk
  376.         (askoptions
  377.             (prompt "Which xpk libraries do you want to install in your "
  378.                     "\"LIBS:compressors\" drawer?")
  379.             (help @askoptions-help)
  380.             (choices
  381.                 "xpkSMPL.library"
  382.                 "xpkSQSH.library (68000)"
  383.                 "XpkSQSH.library (68020)"
  384.             (default marked)
  385.             )
  386.         )
  387.     )
  388.  
  389.  
  390.     (set arexx
  391.         (askbool
  392.             (prompt "Do you want to install ARexx?")
  393.             (help @askbool-help)
  394.         )
  395.     )
  396.  
  397.  
  398.     (set doc
  399.         (askbool
  400.             (prompt "Do you want to install docs?")
  401.             (help "If you select yes, you can select between all the "
  402.                   "different docs. All the docs will be install in the "
  403.                   "\"APlayer/Docs\" drawer.")
  404.         )
  405.     )
  406.  
  407.     (set docflag 0)
  408.     (if doc
  409.         (set docflag
  410.             (askoptions
  411.                 (prompt "Which files do you want to install in the "
  412.                         "\"APlayer/Docs\" drawer?")
  413.                 (help @askoptions-help)
  414.                 (choices
  415.                     "APlayer.guide"
  416.                     "MissingModules.txt"
  417.                     "PlaySid.doc"
  418.                     "SMPL.doc"
  419.                     "SQSH.doc"
  420.                     "Unpack.guide"
  421.                     "RegistrationForm"
  422.                     "Installer Script"
  423.                 )
  424.             )
  425.         )
  426.     )
  427.  
  428.  
  429. ;    (set developer
  430. ;        (askbool
  431. ;            (prompt "Do you want to install the developer set?")
  432. ;            (help @askbool-help)
  433. ;        )
  434. ;    )
  435.  
  436.  
  437.     (set ahi
  438.         (askbool
  439.             (prompt "Do you want to install AHI?\n\n"
  440.                     "The AHI package is created by Martin Blom "
  441.                     "and is an audio driver for sound cards and "
  442.                     "the standard Amiga hardware. APlayer has a NotePlayer "
  443.                     "in this archive which use AHI.\n\n"
  444.                     "Notice that the AHI requires 68020+.")
  445.             (help "If you select yes, you can select between all the "
  446.                   "different drivers.")
  447.         )
  448.     )
  449.  
  450.     (set ahiflag 0)
  451.     (if ahi
  452.         (
  453.             (set ahic
  454.                 (askdir
  455.                     (prompt "AHI needs a CLI command to run. Where do you "
  456.                             "want to install it?")
  457.                     (help @askdir-help)
  458.                     (default "C:")
  459.                 )
  460.             )
  461.  
  462.             (set ahiflag
  463.                 (askoptions
  464.                     (prompt "Which AHI drivers do you want to install in "
  465.                                     "your \"DEVS:AudioModes\" and "
  466.                                     "your \"DEVS:AHI\" drawers?")
  467.                     (help @askoptions-help)
  468.                     (choices
  469.                         "Delfina"
  470.                         "File Save"
  471.                         "Paula"
  472.                         "Prelude"
  473.                         "Toccata"
  474.                         "Wavetools"
  475.                     )
  476.                 )
  477.             )
  478.         )
  479.     )
  480.  
  481.  
  482. ; ** Begin to copy the files
  483.  
  484.     (set @default-dest (tackon @default-dest "APlayer"))
  485.     (set lhex (tackon sdir "C/lhex"))
  486.     (set tempdir "T:apTemp")
  487.     (set deldir tempdir)
  488.  
  489.     (makedir tempdir)
  490.     (makedir @default-dest)
  491.  
  492.     (if (not (exists (tackon @default-dest "/APlayer.info")))
  493.         (copyfiles                             ;Copy Icon To APlayer Directory
  494.             (source (tackon sdir "/APlayer.info"))
  495.             (dest (tackon @default-dest "/"))
  496.         )
  497.     )
  498.  
  499.     (set oldversion 0)
  500.     (if (exists (tackon @default-dest "APlayer"))
  501.         (
  502.             (set ver (getversion (tackon @default-dest "APlayer")))
  503.             (set oldversion (/ ver 65536))
  504.         )
  505.     )
  506.  
  507.     (if fileflag
  508.         (
  509.             (working "Unpacking program archive....")
  510.             (run ("\"%s\" -fqw=%s x Files/Program.lha >NIL:" lhex tempdir))
  511.  
  512.             (if (in fileflag 0)                     ;APlayer File
  513.                 (
  514.                     (set datadir (tackon @default-dest "Data"))
  515.                     (makedir datadir)
  516.                     (copyfiles
  517.                         (source (tackon tempdir "APlayer"))
  518.                         (dest @default-dest)
  519.                         (infos)
  520.                     )
  521.  
  522.                     (copyfiles
  523.                         (source (tackon tempdir "Data/Help.Nodes"))
  524.                         (dest (tackon @default-dest "Data/"))
  525.                     )
  526.  
  527.                     (copyfiles
  528.                         (source (tackon tempdir "Data/Tips.dat"))
  529.                         (dest (tackon @default-dest "Data/"))
  530.                     )
  531.  
  532.                     (copyfiles
  533.                         (source (tackon tempdir "Data/Why.dat"))
  534.                         (dest (tackon @default-dest "Data/"))
  535.                     )
  536.                 )
  537.             )
  538.  
  539.             (if (in fileflag 1)                     ;Commercial Picture
  540.                 (
  541.                     (copyfiles
  542.                         (source (tackon sdir "ShowMe.jpg"))
  543.                         (dest @default-dest)
  544.                         (infos)
  545.                     )
  546.                 )
  547.             )
  548.  
  549.             (set deldir (tackon tempdir "Data"))
  550.             (DeleteAll)
  551.             (set deldir tempdir)
  552.             (DeleteAll)
  553.         )
  554.     )
  555.     (complete 10)
  556.  
  557.  
  558.     (if (or (or (or (or (or (or playflag1 playflag2) playflag3) playflag4) playflag5) playflag6) playflag7)
  559.         (
  560.             (makedir "LIBS:APlayer")
  561.             (working "Unpacking player archive....")
  562.             (run ("\"%s\" -fqw=%s x Files/Players.lha >NIL:" lhex tempdir))
  563.             (set libdest "LIBS:APlayer/")
  564.             (delete "LIBS:APlayer/apHolyNoise.library")
  565.  
  566.             (if playflag1
  567.                 (
  568.                     (if (in playflag1 0)
  569.                         (
  570.                             (set libname "apActivisionPro.library")
  571.                             (InstallLib)
  572.                         )
  573.                     )
  574.  
  575.                     (if (in playflag1 1)
  576.                         (
  577.                             (set libname "apArtOfNoise.library")
  578.                             (InstallLib)
  579.                         )
  580.                     )
  581.  
  582.                     (if (in playflag1 2)
  583.                         (
  584.                             (set libname "apBenDaglish.library")
  585.                             (InstallLib)
  586.                         )
  587.                     )
  588.  
  589.                     (if (in playflag1 3)
  590.                         (
  591.                             (set libname "apDeliCustom.library")
  592.                             (InstallLib)
  593.                         )
  594.                     )
  595.  
  596.                     (if (in playflag1 4)
  597.                         (
  598.                             (set libname "apDelta10.library")
  599.                             (InstallLib)
  600.                         )
  601.                     )
  602.  
  603.                     (if (in playflag1 5)
  604.                         (
  605.                             (set libname "apDelta20.library")
  606.                             (InstallLib)
  607.                         )
  608.                     )
  609.  
  610.                     (if (in playflag1 6)
  611.                         (
  612.                             (set libname "apDigiBooster.library")
  613.                             (InstallLib)
  614.                         )
  615.                     )
  616.  
  617.                     (if (in playflag1 7)
  618.                         (
  619.                             (set libname "apDigitalMugician.library")
  620.                             (InstallLib)
  621.                         )
  622.                     )
  623.                 )
  624.             )
  625.             (complete 11)
  626.  
  627.             (if playflag2
  628.                 (
  629.                     (if (in playflag2 0)
  630.                         (
  631.                             (set libname "apDSS.library")
  632.                             (InstallLib)
  633.                         )
  634.                     )
  635.  
  636.                     (if (in playflag2 1)
  637.                         (
  638.                             (set libname "apFastTracker.library")
  639.                             (InstallLib)
  640.                         )
  641.                     )
  642.  
  643.                     (if (in playflag2 2)
  644.                         (
  645.                             (set libname "apFastTracker20.library")
  646.                             (InstallLib)
  647.                         )
  648.                     )
  649.  
  650.                     (if (in playflag2 3)
  651.                         (
  652.                             (set libname "apFred.library")
  653.                             (InstallLib)
  654.                         )
  655.                     )
  656.  
  657.                     (if (in playflag2 4)
  658.                         (
  659.                             (set libname "apFuture13.library")
  660.                             (InstallLib)
  661.                         )
  662.                     )
  663.  
  664.                     (if (in playflag2 5)
  665.                         (
  666.                             (set libname "apFuture14.library")
  667.                             (InstallLib)
  668.                         )
  669.                     )
  670.  
  671.                     (if (in playflag2 6)
  672.                         (
  673.                             (set libname "apHippel.library")
  674.                             (InstallLib)
  675.                         )
  676.                     )
  677.  
  678.                     (if (in playflag2 7)
  679.                         (
  680.                             (set libname "apIFF-8SVX.library")
  681.                             (InstallLib)
  682.                         )
  683.                     )
  684.                 )
  685.             )
  686.             (complete 13)
  687.  
  688.             (if playflag3
  689.                 (
  690.                     (if (in playflag3 0)
  691.                         (
  692.                             (set libname "apIFF-AIFF.library")
  693.                             (InstallLib)
  694.                         )
  695.                     )
  696.  
  697.                     (if (in playflag3 1)
  698.                         (
  699.                             (set libname "apIFF-SMUS.library")
  700.                             (InstallLib)
  701.                         )
  702.                     )
  703.  
  704.                     (if (in playflag3 2)
  705.                         (
  706.                             (set libname "apImpulseTracker.library")
  707.                             (InstallLib)
  708.                         )
  709.                     )
  710.  
  711.                     (if (in playflag3 3)
  712.                         (
  713.                             (set libname "apInStereo20.library")
  714.                             (InstallLib)
  715.                         )
  716.                     )
  717.  
  718.                     (if (in playflag3 4)
  719.                         (
  720.                             (set libname "apJamCracker.library")
  721.                             (InstallLib)
  722.                         )
  723.                     )
  724.  
  725.                     (if (in playflag3 5)
  726.                         (
  727.                             (set libname "apJCBrooke.library")
  728.                             (InstallLib)
  729.                         )
  730.                     )
  731.  
  732.                     (if (in playflag3 6)
  733.                         (
  734.                             (set libname "apMON.library")
  735.                             (InstallLib)
  736.                         )
  737.                     )
  738.  
  739.                     (if (in playflag3 7)
  740.                         (
  741.                             (set libname "apMarkCooksey.library")
  742.                             (InstallLib)
  743.                         )
  744.                     )
  745.                 )
  746.             )
  747.             (complete 14)
  748.  
  749.             (if playflag4
  750.                 (
  751.                     (if (in playflag4 0)
  752.                         (
  753.                             (set libname "apMarkII.library")
  754.                             (InstallLib)
  755.                         )
  756.                     )
  757.  
  758.                     (if (in playflag4 1)
  759.                         (
  760.                             (set libname "apMultiTracker.library")
  761.                             (InstallLib)
  762.                         )
  763.                     )
  764.  
  765.                     (if (in playflag4 2)
  766.                         (
  767.                             (set libname "apMusicAss.library")
  768.                             (InstallLib)
  769.                         )
  770.                     )
  771.  
  772.                     (if (in playflag4 3)
  773.                         (
  774.                             (set libname "apMLine.library")
  775.                             (InstallLib)
  776.                         )
  777.                     )
  778.  
  779.                     (if (in playflag4 4)
  780.                         (
  781.                             (set libname "apNoisePacker20.library")
  782.                             (InstallLib)
  783.                         )
  784.                     )
  785.  
  786.                     (if (in playflag4 5)
  787.                         (
  788.                             (set libname "apNoisePacker30.library")
  789.                             (InstallLib)
  790.                         )
  791.                     )
  792.  
  793.                     (if (in playflag4 6)
  794.                         (
  795.                             (set libname "apOctaMed.library")
  796.                             (InstallLib)
  797.                         )
  798.                     )
  799.  
  800.                     (if (in playflag4 7)
  801.                         (
  802.                             (set libname "apOctaMedSS.library")
  803.                             (InstallLib)
  804.                         )
  805.                     )
  806.                 )
  807.             )
  808.             (complete 16)
  809.  
  810.             (if playflag5
  811.                 (
  812.                     (if (in playflag5 0)
  813.                         (
  814.                             (set libname "apOktalyzer.library")
  815.                             (InstallLib)
  816.                         )
  817.                     )
  818.  
  819.                     (if (in playflag5 1)
  820.                         (
  821.                             (set libname "apPumaTracker.library")
  822.                             (InstallLib)
  823.                         )
  824.                     )
  825.  
  826.                     (if (in playflag5 2)
  827.                         (
  828.                             (set libname "apQuadraComposer.library")
  829.                             (InstallLib)
  830.                         )
  831.                     )
  832.  
  833.                     (if (in playflag5 3)
  834.                         (
  835.                             (set libname "apRIFF-WAVE.library")
  836.                             (InstallLib)
  837.                         )
  838.                     )
  839.  
  840.                     (if (in playflag5 4)
  841.                         (
  842.                             (set libname "apRonKlaren.library")
  843.                             (InstallLib)
  844.                         )
  845.                     )
  846.  
  847.                     (if (in playflag5 5)
  848.                         (
  849.                             (set libname "apScreamTracker30.library")
  850.                             (InstallLib)
  851.                         )
  852.                     )
  853.  
  854.                     (if (in playflag5 6)
  855.                         (
  856.                             (set libname "apSID.library")
  857.                             (InstallLib)
  858.                         )
  859.                     )
  860.  
  861.                     (if (in playflag5 7)
  862.                         (
  863.                             (set libname "apSidMon10.library")
  864.                             (InstallLib)
  865.                         )
  866.                     )
  867.                 )
  868.             )
  869.             (complete 17)
  870.  
  871.             (if playflag6
  872.                 (
  873.                     (if (in playflag6 0)
  874.                         (
  875.                             (set libname "apSidMon20.library")
  876.                             (InstallLib)
  877.                         )
  878.                     )
  879.  
  880.                     (if (in playflag6 1)
  881.                         (
  882.                             (set libname "apSoundFactory.library")
  883.                             (InstallLib)
  884.                         )
  885.                     )
  886.  
  887.                     (if (in playflag6 2)
  888.                         (
  889.                             (set libname "apSoundFX13.library")
  890.                             (InstallLib)
  891.                         )
  892.                     )
  893.  
  894.                     (if (in playflag6 3)
  895.                         (
  896.                             (set libname "apSoundFX20.library")
  897.                             (InstallLib)
  898.                         )
  899.                     )
  900.  
  901.                     (if (in playflag6 4)
  902.                         (
  903.                             (set libname "apSoundMon20.library")
  904.                             (InstallLib)
  905.                         )
  906.                     )
  907.  
  908.                     (if (in playflag6 5)
  909.                         (
  910.                             (set libname "apStarTrekker4.library")
  911.                             (InstallLib)
  912.                         )
  913.                     )
  914.  
  915.                     (if (in playflag6 6)
  916.                         (
  917.                             (set libname "apStarTrekker4AM.library")
  918.                             (InstallLib)
  919.                         )
  920.                     )
  921.  
  922.                     (if (in playflag6 7)
  923.                         (
  924.                             (set libname "apSyntracker.library")
  925.                             (InstallLib)
  926.                         )
  927.                     )
  928.                 )
  929.             )
  930.             (complete 19)
  931.  
  932.             (if playflag7
  933.                 (
  934.                     (if (in playflag7 0)
  935.                         (
  936.                             (set libname "apTFMX_15.library")
  937.                             (InstallLib)
  938.                         )
  939.                     )
  940.  
  941.                     (if (in playflag7 1)
  942.                         (
  943.                             (set libname "apTHX.library")
  944.                             (InstallLib)
  945.                         )
  946.                     )
  947.  
  948.                     (if (in playflag7 2)
  949.                         (
  950.                             (set libname "apTronicTracker.library")
  951.                             (InstallLib)
  952.                         )
  953.                     )
  954.  
  955.                     (if (in playflag7 3)
  956.                         (
  957.                             (set libname "apWhittaker.library")
  958.                             (InstallLib)
  959.                         )
  960.                     )
  961.                 )
  962.             )
  963.         (DeleteAll)
  964.         )
  965.     )
  966.     (complete 20)
  967.  
  968.  
  969.     (if noteplayflag1
  970.         (
  971.             (makedir "LIBS:APlayer/NotePlayers")
  972.             (working "Unpacking NotePlayer archive....")
  973.             (run ("\"%s\" -fqw=%s x Files/NotePlayers.lha >NIL:" lhex tempdir))
  974.             (set libdest "LIBS:APlayer/NotePlayers")
  975.  
  976.             (if (in noteplayflag1 0)
  977.                 (
  978.                     (set libname "an14BitStereo-2Voices.library")
  979.                     (InstallLib)
  980.                 )
  981.             )
  982.  
  983.             (if (in noteplayflag1 1)
  984.                 (
  985.                     (set libname "an14BitStereo-32Voices.library")
  986.                     (InstallLib)
  987.                 )
  988.             )
  989.  
  990.             (if (in noteplayflag1 2)
  991.                 (
  992.                     (set libname "anAHI-64Voices.library")
  993.                     (InstallLib)
  994.                 )
  995.             )
  996.  
  997.             (if (in noteplayflag1 3)
  998.                 (
  999.                     (set libname "anFastMem-4Voices.library")
  1000.                     (InstallLib)
  1001.                 )
  1002.             )
  1003.  
  1004.             (if (in noteplayflag1 4)
  1005.                 (
  1006.                     (set libname "anMono-32Voices.library")
  1007.                     (InstallLib)
  1008.                 )
  1009.             )
  1010.  
  1011.             (if (in noteplayflag1 5)
  1012.                 (
  1013.                     (set libname "anReSurround-32Voices.library")
  1014.                     (InstallLib)
  1015.                 )
  1016.             )
  1017.  
  1018.             (if (in noteplayflag1 6)
  1019.                 (
  1020.                     (set libname "anStereo-32Voices.library")
  1021.                     (InstallLib)
  1022.                 )
  1023.             )
  1024.  
  1025.             (if (in noteplayflag1 7)
  1026.                 (
  1027.                     (set libname "anSurround-32Voices.library")
  1028.                     (InstallLib)
  1029.                 )
  1030.             )
  1031.         (DeleteAll)
  1032.         )
  1033.     )
  1034.     (complete 30)
  1035.  
  1036.  
  1037.     (if agentflag1
  1038.         (
  1039.             (makedir "LIBS:APlayer/Agents")
  1040.             (working "Unpacking Agent archive....")
  1041.             (run ("\"%s\" -fqw=%s x Files/Agents.lha >NIL:" lhex tempdir))
  1042.             (set libdest "LIBS:APlayer/Agents")
  1043.  
  1044.             (if (in agentflag1 0)
  1045.                 (
  1046.                     (set libname "aaFSS.library")
  1047.                     (InstallLib)
  1048.                 )
  1049.             )
  1050.  
  1051.             (if (in agentflag1 1)
  1052.                 (
  1053.                     (set libname "aaMulti-SampleSaver.library")
  1054.                     (InstallLib)
  1055.                 )
  1056.             )
  1057.  
  1058.             (if (in agentflag1 2)
  1059.                 (
  1060.                     (set libname "aaBar-Scope.library")
  1061.                     (InstallLib)
  1062.                 )
  1063.             )
  1064.  
  1065.             (if (in agentflag1 3)
  1066.                 (
  1067.                     (set libname "aaFreqAnalyzer-Scope.library")
  1068.                     (InstallLib)
  1069.                 )
  1070.             )
  1071.  
  1072.             (if (in agentflag1 4)
  1073.                 (
  1074.                     (set libname "aaRGBBox-Scope.library")
  1075.                     (InstallLib)
  1076.                 )
  1077.             )
  1078.  
  1079.             (if (in agentflag1 5)
  1080.                 (
  1081.                     (set libname "aaSpinSquare-Scope.library")
  1082.                     (InstallLib)
  1083.                 )
  1084.             )
  1085.         (DeleteAll)
  1086.         )
  1087.     )
  1088.     (complete 35)
  1089.  
  1090.     (if multiflag1
  1091.         (
  1092.             (makedir "LIBS:APlayer/Agents/MSSModules")
  1093.             (working "Unpacking Multi Modules archive....")
  1094.             (run ("\"%s\" -fqw=%s x Files/MultiMods.lha >NIL:" lhex tempdir))
  1095.             (set libdest "LIBS:APlayer/Agents/MSSModules")
  1096.  
  1097.             (if (in multiflag1 0)
  1098.                 (
  1099.                     (set libname "mmIFF-8SVX.library")
  1100.                     (InstallLib)
  1101.                 )
  1102.             )
  1103.  
  1104.             (if (in multiflag1 1)
  1105.                 (
  1106.                     (set libname "mmIFF-AIFF.library")
  1107.                     (InstallLib)
  1108.                 )
  1109.             )
  1110.  
  1111.             (if (in multiflag1 2)
  1112.                 (
  1113.                     (set libname "mmRaw.library")
  1114.                     (InstallLib)
  1115.                 )
  1116.             )
  1117.  
  1118.             (if (in multiflag1 3)
  1119.                 (
  1120.                     (set libname "mmRIFF-WAVE.library")
  1121.                     (InstallLib)
  1122.                 )
  1123.             )
  1124.  
  1125.             (if (in multiflag1 4)
  1126.                 (
  1127.                     (set libname "mmWorms.library")
  1128.                     (InstallLib)
  1129.                 )
  1130.             )
  1131.         (DeleteAll)
  1132.         )
  1133.     )
  1134.     (complete 40)
  1135.  
  1136.  
  1137.     (if libs
  1138.         (
  1139.             (working "Unpacking library archive....")
  1140.             (run ("\"%s\" -fqw=%s x Files/Libraries.lha >NIL:" lhex tempdir))
  1141.             (set libdest "LIBS:")
  1142.  
  1143.             (if (in libs 0)
  1144.                 (
  1145.                     (set libname "mline.library")
  1146.                     (InstallLib)
  1147.                 )
  1148.             )
  1149.  
  1150.             (if (in libs 1)
  1151.                 (
  1152.                     (set libname "playsid.library")
  1153.                     (InstallLib)
  1154.                 )
  1155.             )
  1156.  
  1157.             (if (in libs 2)
  1158.                 (
  1159.                     (set libname "reqtools.library")
  1160.                     (InstallLib)
  1161.                 )
  1162.             )
  1163.  
  1164.             (if (in libs 3)
  1165.                 (
  1166.                     (set libname "rexxtools.library")
  1167.                     (InstallLib)
  1168.                 )
  1169.             )
  1170.  
  1171.             (if (in libs 4)
  1172.                 (
  1173.                     (set libname "xpkmaster.library")
  1174.                     (InstallLib)
  1175.                 )
  1176.             )
  1177.  
  1178.             (if (in libs 5)
  1179.                 (
  1180.                     (set libname "unpack.library")
  1181.                     (InstallLib)
  1182.                 )
  1183.             )
  1184.         (DeleteAll)
  1185.         )
  1186.     )
  1187.     (complete 50)
  1188.  
  1189.  
  1190.     (if xpk
  1191.         (
  1192.             (makedir "LIBS:compressors")
  1193.             (working "Unpacking XPK-Subs archive....")
  1194.             (run ("\"%s\" -fqw=%s x Files/XPKSubs.lha >NIL:" lhex tempdir))
  1195.             (set libdest "LIBS:compressors/")
  1196.  
  1197.             (if (in xpk 0)
  1198.                 (
  1199.                     (set libname "xpkSMPL.library")
  1200.                     (InstallLib)
  1201.                 )
  1202.             )
  1203.  
  1204.             (if (in xpk 1)
  1205.                 (
  1206.                     (working ("Testing compressors/xpkSQSH.library"))
  1207.                     (copylib
  1208.                         (prompt ("Do you want to install the \"compressors/xpkSQSH.library\"?"))
  1209.                         (help @copylib-help)
  1210.                         (source (tackon tempdir "xpkSQSH000.library"))
  1211.                         (dest libdest)
  1212.                         (newname "xpkSQSH.library")
  1213.                         (confirm)
  1214.                     )
  1215.                 )
  1216.             )
  1217.  
  1218.             (if (in xpk 2)
  1219.                 (
  1220.                     (working ("Testing compressors/xpkSQSH.library"))
  1221.                     (copylib
  1222.                         (prompt ("Do you want to install the \"compressors/xpkSQSH.library\"?"))
  1223.                         (help @copylib-help)
  1224.                         (source (tackon tempdir "xpkSQSH020.library"))
  1225.                         (dest libdest)
  1226.                         (newname "xpkSQSH.library")
  1227.                         (confirm)
  1228.                     )
  1229.                 )
  1230.             )
  1231.         (DeleteAll)
  1232.         )
  1233.     )
  1234.     (complete 60)
  1235.  
  1236.  
  1237.     (if arexx
  1238.         (
  1239.             (set arexxdir (tackon @default-dest "ARexx"))
  1240.             (makedir arexxdir)
  1241.             (working "Unpacking ARexx archive....")
  1242.             (run ("\"%s\" -fqw=%s x Files/ARexx.lha >NIL:" lhex arexxdir))
  1243.         )
  1244.     )
  1245.     (complete 70)
  1246.  
  1247.  
  1248.     (if doc
  1249.         (
  1250.             (set docdir (tackon @default-dest "Docs"))
  1251.             (makedir (tackon @default-dest "Docs") (infos))
  1252.             (working "Unpacking Docs archive....")
  1253.             (run ("\"%s\" -fqw=%s x Files/Docs.lha >NIL:" lhex tempdir))
  1254.  
  1255.             (if (in docflag 0)
  1256.                 (
  1257.                     (copyfiles
  1258.                         (source (tackon tempdir "APlayer.guide"))
  1259.                         (dest docdir)
  1260.                         (infos)
  1261.                     )
  1262.                 )
  1263.             )
  1264.  
  1265.             (if (in docflag 1)
  1266.                 (
  1267.                     (copyfiles
  1268.                         (source (tackon tempdir "MissingModules.txt"))
  1269.                         (dest docdir)
  1270.                         (infos)
  1271.                     )
  1272.                 )
  1273.             )
  1274.  
  1275.             (if (in docflag 2)
  1276.                 (
  1277.                     (copyfiles
  1278.                         (source (tackon tempdir "PlaySid.doc"))
  1279.                         (dest docdir)
  1280.                         (infos)
  1281.                     )
  1282.                 )
  1283.             )
  1284.  
  1285.             (if (in docflag 3)
  1286.                 (
  1287.                     (copyfiles
  1288.                         (source (tackon tempdir "SMPL.doc"))
  1289.                         (dest docdir)
  1290.                         (infos)
  1291.                     )
  1292.                 )
  1293.             )
  1294.  
  1295.             (if (in docflag 4)
  1296.                 (
  1297.                     (copyfiles
  1298.                         (source (tackon tempdir "SQSH.doc"))
  1299.                         (dest docdir)
  1300.                         (infos)
  1301.                     )
  1302.                 )
  1303.             )
  1304.  
  1305.             (if (in docflag 5)
  1306.                 (
  1307.                     (delete (tackon docdir "Unpack.doc"))
  1308.                     (delete (tackon docdir "Unpack.doc.info"))
  1309.                     (copyfiles
  1310.                         (source (tackon tempdir "Unpacker.guide"))
  1311.                         (dest docdir)
  1312.                         (infos)
  1313.                     )
  1314.                 )
  1315.             )
  1316.  
  1317.             (if (in docflag 6)
  1318.                 (
  1319.                     (copyfiles
  1320.                         (source (tackon tempdir "RegistrationForm"))
  1321.                         (dest docdir)
  1322.                         (infos)
  1323.                     )
  1324.                 )
  1325.             )
  1326.  
  1327.             (if (in docflag 7)
  1328.                 (
  1329.                     (copyfiles
  1330.                         (source (tackon sdir "HDInstall"))
  1331.                         (dest @default-dest)
  1332.                         (infos)
  1333.                     )
  1334.                 )
  1335.             )
  1336.         (delete (tackon docdir "Bonus.doc"))
  1337.         (delete (tackon docdir "Bonus.doc.info"))
  1338.         (DeleteAll)
  1339.         )
  1340.     )
  1341.     (complete 80)
  1342.  
  1343.  
  1344. ;    (if developer
  1345. ;        (
  1346. ;            (set devdir (tackon @default-dest "Developer"))
  1347. ;            (makedir devdir)
  1348. ;            (working "Unpacking Developer archive....")
  1349. ;            (run ("\"%s\" -fqw=%s x Files/Developer.lha >NIL:" lhex devdir))
  1350. ;        )
  1351. ;    )
  1352.  
  1353.  
  1354.     (if ahi
  1355.         (
  1356.             (working "Unpacking AHI archive....")
  1357.             (run ("\"%s\" -fqw=%s x Files/AHI.lha >NIL:" lhex tempdir))
  1358.  
  1359.             (delete (tackon docdir "ahi.readme"))
  1360.  
  1361.             (if doc
  1362.                 (
  1363.                     (copyfiles
  1364.                         (source (tackon tempdir "ahiusr.readme"))
  1365.                         (dest docdir)
  1366.                     )
  1367.                 )
  1368.             )
  1369.  
  1370.             (copyfiles
  1371.                 (source (tackon tempdir "C/AddAudioModes"))
  1372.                 (dest ahic)
  1373.             )
  1374.  
  1375.             (set libdest "DEVS:")
  1376.             (set libname "Devs/ahi.device")
  1377.             (InstallLib)
  1378.  
  1379.             (makedir "DEVS:AHI")
  1380.             (makedir "DEVS:AudioModes")
  1381.  
  1382.             (if (in ahiflag 0)
  1383.                 (
  1384.                     (set libdest "DEVS:AHI")
  1385.                     (set libname "Devs/AHI/delfina.audio")
  1386.                     (InstallLib)
  1387.  
  1388.                     (copyfiles
  1389.                         (source (tackon tempdir "Devs/AudioModes/DELFINA"))
  1390.                         (dest "DEVS:AudioModes")
  1391.                     )
  1392.                 )
  1393.             )
  1394.  
  1395.             (if (in ahiflag 1)
  1396.                 (
  1397.                     (set libdest "DEVS:AHI")
  1398.                     (set libname "Devs/AHI/filesave.audio")
  1399.                     (InstallLib)
  1400.  
  1401.                     (copyfiles
  1402.                         (source (tackon tempdir "Devs/AudioModes/FILESAVE"))
  1403.                         (dest "DEVS:AudioModes")
  1404.                     )
  1405.                 )
  1406.             )
  1407.  
  1408.             (if (in ahiflag 2)
  1409.                 (
  1410.                     (set libdest "DEVS:AHI")
  1411.                     (set libname "Devs/AHI/paula.audio")
  1412.                     (InstallLib)
  1413.  
  1414.                     (copyfiles
  1415.                         (source (tackon tempdir "Devs/AudioModes/PAULA"))
  1416.                         (dest "DEVS:AudioModes")
  1417.                     )
  1418.                 )
  1419.             )
  1420.  
  1421.             (if (in ahiflag 3)
  1422.                 (
  1423.                     (set libdest "DEVS:AHI")
  1424.                     (set libname "Devs/AHI/prelude.audio")
  1425.                     (InstallLib)
  1426.  
  1427.                     (copyfiles
  1428.                         (source (tackon tempdir "Devs/AudioModes/PRELUDE"))
  1429.                         (dest "DEVS:AudioModes")
  1430.                     )
  1431.                 )
  1432.             )
  1433.  
  1434.             (if (in ahiflag 4)
  1435.                 (
  1436.                     (set libdest "DEVS:AHI")
  1437.                     (set libname "Devs/AHI/toccata.audio")
  1438.                     (InstallLib)
  1439.  
  1440.                     (copyfiles
  1441.                         (source (tackon tempdir "Devs/AudioModes/TOCCATA"))
  1442.                         (dest "DEVS:AudioModes")
  1443.                     )
  1444.  
  1445.                     (message "The Toccata driver doesn't work with the "
  1446.                              "toccata.library version 9.10. This is just "
  1447.                              "a notice.")
  1448.  
  1449.                     (set libdest "LIBS:")
  1450.                     (set libname "toccata.library")
  1451.                     (InstallLib)
  1452.                 )
  1453.             )
  1454.  
  1455.             (if (in ahiflag 5)
  1456.                 (
  1457.                     (set libdest "DEVS:AHI")
  1458.                     (set libname "Devs/AHI/wavetools.audio")
  1459.                     (InstallLib)
  1460.  
  1461.                     (copyfiles
  1462.                         (source (tackon tempdir "Devs/AudioModes/WAVETOOLS"))
  1463.                         (dest "DEVS:AudioModes")
  1464.                     )
  1465.                 )
  1466.             )
  1467.  
  1468.             (set deldir (tackon tempdir "C"))
  1469.             (DeleteAll)
  1470.             (set deldir (tackon tempdir "Devs/AHI"))
  1471.             (DeleteAll)
  1472.             (set deldir (tackon tempdir "Devs/AudioModes"))
  1473.             (DeleteAll)
  1474.             (set deldir (tackon tempdir "Devs"))
  1475.             (DeleteAll)
  1476.             (set deldir tempdir)
  1477.             (DeleteAll)
  1478.         )
  1479.     )
  1480.     (complete 90)
  1481.  
  1482. ; Delete Bonus Files
  1483.  
  1484.     (set deldir (tackon @default-dest "Bonus"))
  1485.     (DeleteAll)
  1486.     (delete deldir)
  1487.  
  1488. ; Check for obsolete players
  1489.  
  1490.     (set obplay "")
  1491.     (if (exists "LIBS:APlayer/apMED.library")
  1492.         (
  1493.             (set obplay "MED\n")
  1494.             (delete "LIBS:APlayer/apMED.library")
  1495.         )
  1496.     )
  1497.  
  1498.     (if (exists "LIBS:APlayer/apTakeTracker.library")
  1499.         (
  1500.             (set obplay (cat obplay "TakeTracker\n"))
  1501.             (delete "LIBS:APlayer/apTakeTracker.library")
  1502.         )
  1503.     )
  1504.  
  1505.     (if (not (= obplay ""))
  1506.         (message "Below is a list of some players which are obsolete. "
  1507.                  "They are deleted from your LIBS:APlayer/ drawer. "
  1508.                  "Be sure to delete them from your player config.\n\n"
  1509.                  obplay)
  1510.     )
  1511.  
  1512.  
  1513. ; Fix the configuration files
  1514.  
  1515.     (makedir "ENVARC:APlayer")
  1516.     (makedir "ENVARC:APlayer/Players")
  1517.     (makedir "ENVARC:APlayer/NotePlayers")
  1518.  
  1519.     ; From a very early version, the config where in the "root".
  1520.  
  1521.     (delete "ENVARC:APlayer/IFF-8SVX.cfg")
  1522.     (delete "ENVARC:APlayer/IFF-AIFF.cfg")
  1523.     (delete "ENVARC:APlayer/Protracker.cfg")
  1524.     (delete "ENVARC:APlayer/Players/Protracker.cfg")
  1525.  
  1526.  
  1527.     ; From Version 2, we have changed the config data, so we have
  1528.     ; to delete old config files.
  1529.  
  1530.     (if (< oldversion 2)
  1531.         (
  1532.             (delete "ENVARC:APlayer/Players/IFF-8SVX.cfg")
  1533.             (delete "ENVARC:APlayer/Players/IFF-AIFF.cfg")
  1534.             (delete "ENVARC:APlayer/Players/RIFF-WAVE.cfg")
  1535.         )
  1536.     )
  1537.  
  1538.  
  1539.     ; Delete files that are obsolete.
  1540.  
  1541.     (delete "ENVARC:APlayer/NotePlayers/FastMem4.cfg")
  1542.  
  1543.  
  1544.     ; Copy default player config file.
  1545.  
  1546.     (if big
  1547.         (
  1548.             (if (not (exists "ENVARC:APlayer/APlayer.libs"))
  1549.                 (
  1550.                     (copyfiles
  1551.                         (source "Files/!APlayer.libs")
  1552.                         (dest "ENVARC:APlayer/")
  1553.                     )
  1554.                     (rename "ENVARC:APlayer/!APlayer.libs" "ENVARC:APlayer/APlayer.libs")
  1555.                 )
  1556.             )
  1557.         )
  1558.     )
  1559.  
  1560.  
  1561.     ; Do we have to convert the config file?
  1562.  
  1563.     (if (< oldversion 2)
  1564.         (
  1565.             (if (exists "ENVARC:APlayer/APlayer.prefs")
  1566.                 (
  1567.                     (if (askbool
  1568.                             (prompt "Do you want to convert your old preference"
  1569.                                     "file to the new format?")
  1570.                             (help "From this version of APlayer, the file format"
  1571.                                   " of the preference file is changed. Therefore"
  1572.                                   " you have to convert your preference file to"
  1573.                                   " the new format if you want to use your old"
  1574.                                   " settings.")
  1575.                         )
  1576.                         (
  1577.                             (run ("\"%s\" >ENV:convtxt" (tackon sdir "C/PrefsConvert")))
  1578.  
  1579.                             (if (not (exists "ENVARC:APlayer/APlayer2.0.prefs"))
  1580.                                 (
  1581.                                     (message "Something went wrong when converting!!!\n\n"
  1582.                                              ("%s" (getenv "convtxt")))
  1583.                                 )
  1584.                                 (
  1585.                                     (if (askbool
  1586.                                             (prompt "You now have a new preference file."
  1587.                                                     " Do you want to delete your"
  1588.                                                     " old preference files and rename the new "
  1589.                                                     "one?")
  1590.                                             (help @askbool-help)
  1591.                                         )
  1592.                                         (
  1593.                                             (delete "ENVARC:APlayer/APlayer.prefs")
  1594.                                             (delete "ENVARC:APlayer/APlayer.win")
  1595.                                             (delete "ENVARC:APlayer/APlayer.arexx")
  1596.                                             (rename "ENVARC:APlayer/APlayer2.0.prefs" "ENVARC:APlayer/APlayer.prefs")
  1597.                                             (rename "ENVARC:APlayer/APlayer2.0.win" "ENVARC:APlayer/APlayer.win")
  1598.                                         )
  1599.                                     )
  1600.                                 )
  1601.                             )
  1602.                         )
  1603.                     )
  1604.                     (delete "ENV:convtxt")
  1605.                 )
  1606.             )
  1607.         )
  1608.     )
  1609.     (
  1610.         (run ("\"%s\" >ENV:convtxt" (tackon sdir "C/PrefFix")))
  1611.     )
  1612.  
  1613.     (complete 100)
  1614.     (delete tempdir)
  1615.  
  1616.     (message "You have to reset your computer before using APlayer.")
  1617. )
  1618.  
  1619. ;--------------------------------------------------------------------------
  1620. ; ** Remove Procedure
  1621.  
  1622. (procedure Remove
  1623.     (if (askbool
  1624.             (prompt "This procedure will remove all files associated to "
  1625.                     "the APlayer program. This means the program, docs, "
  1626.                     "preference files and all extern players.\n\n"
  1627.                     "Are you sure you want to continue?")
  1628.             (help @askbool-help)
  1629.         )
  1630.  
  1631.         (
  1632.             (set @default-dest
  1633.                 (askdir
  1634.                     (prompt "Select where the \"APlayer\" drawer are "
  1635.                             "stored.")
  1636.                     (help @askdir-help)
  1637.                     (default @default-dest)
  1638.                 )
  1639.             )
  1640.  
  1641.             (working "Deleting the \"APlayer\" drawer...")
  1642.             (set ddir (tackon @default-dest "APlayer"))
  1643.  
  1644.             (set deldir (tackon ddir "Data"))
  1645.             (DeleteAll)
  1646.  
  1647.             (set deldir (tackon ddir "ARexx/IR_Scripts"))
  1648.             (DeleteAll)
  1649.             (set deldir (tackon ddir "ARexx"))
  1650.             (DeleteAll)
  1651.  
  1652.             (set deldir (tackon ddir "Bonus"))
  1653.             (DeleteAll)
  1654.  
  1655.             (set deldir (tackon ddir "Docs"))
  1656.             (DeleteAll)
  1657.  
  1658.             (set deldir (tackon ddir "Developer/Examples"))
  1659.             (DeleteAll)
  1660.             (set deldir (tackon ddir "Developer/Include3.0/Own"))
  1661.             (DeleteAll)
  1662.             (set deldir (tackon ddir "Developer/Include3.0"))
  1663.             (DeleteAll)
  1664.             (set deldir (tackon ddir "Developer/Rexxtools/Doc"))
  1665.             (DeleteAll)
  1666.             (set deldir (tackon ddir "Developer/Rexxtools/FD"))
  1667.             (DeleteAll)
  1668.             (set deldir (tackon ddir "Developer/Rexxtools/Include/CLib"))
  1669.             (DeleteAll)
  1670.             (set deldir (tackon ddir "Developer/Rexxtools/Include/Libraries"))
  1671.             (DeleteAll)
  1672.             (set deldir (tackon ddir "Developer/Rexxtools/Include/Pragmas"))
  1673.             (DeleteAll)
  1674.             (set deldir (tackon ddir "Developer/Rexxtools/Include/Proto"))
  1675.             (DeleteAll)
  1676.             (set deldir (tackon ddir "Developer/Rexxtools/Include"))
  1677.             (DeleteAll)
  1678.             (set deldir (tackon ddir "Developer/Rexxtools/Libs"))
  1679.             (DeleteAll)
  1680.             (set deldir (tackon ddir "Developer/Rexxtools"))
  1681.             (DeleteAll)
  1682.             (set deldir (tackon ddir "Developer"))
  1683.             (DeleteAll)
  1684.  
  1685.             (set deldir ddir)
  1686.             (DeleteAll)
  1687.  
  1688.             (delete ddir)
  1689.             (delete (tackon @default-dest "APlayer.info"))
  1690.  
  1691.             (delete "S:APlayer.FSS")
  1692.             (complete 20)
  1693.  
  1694.  
  1695.             (working "Deleting preference files...")
  1696.             (set ddir "ENVARC:APlayer")
  1697.             (set deldir (tackon ddir "Players"))
  1698.             (DeleteAll)
  1699.             (set deldir (tackon ddir "NotePlayers"))
  1700.             (DeleteAll)
  1701.             (set deldir (tackon ddir "Agents"))
  1702.             (DeleteAll)
  1703.             (set deldir ddir)
  1704.             (DeleteAll)
  1705.             (delete "ENVARC:APlayer")
  1706.             (complete 40)
  1707.  
  1708.             (working "Deleting external Agents...")
  1709.             (set deldir "LIBS:APlayer/Agents/MSSModules")
  1710.             (DeleteAll)
  1711.             (set deldir "LIBS:APlayer/Agents")
  1712.             (DeleteAll)
  1713.             (delete "LIBS:APlayer/Agents")
  1714.             (complete 60)
  1715.  
  1716.             (working "Deleting external NotePlayers...")
  1717.             (set deldir "LIBS:APlayer/NotePlayers")
  1718.             (DeleteAll)
  1719.             (delete "LIBS:APlayer/NotePlayers")
  1720.             (complete 80)
  1721.  
  1722.             (working "Deleting external players...")
  1723.             (set deldir "LIBS:APlayer")
  1724.             (DeleteAll)
  1725.             (delete "LIBS:APlayer")
  1726.             (complete 100)
  1727.         )
  1728.     )
  1729. )
  1730.  
  1731. ;--------------------------------------------------------------------------
  1732. ; ** Main Stript
  1733.  
  1734. (complete 0)
  1735. (set sdir (pathonly @icon))
  1736.  
  1737. (if (< (/ (getversion) 65536) 37)
  1738.     (abort "You must have Kickstart 2.0 or greater to use this installation"
  1739.            " utility and to run \"Accessible Player\".")
  1740. )
  1741.  
  1742. (message "This installer script will help you to install/remove "
  1743.          "\"Accessible Player\" to/from your hard disk.\n"
  1744.          "If you don't own one, abort immediately.")
  1745.  
  1746. (welcome)
  1747.  
  1748. ; ** Ask to Install Or Remove
  1749.  
  1750. (set askflag (askbool
  1751.                 (prompt "Do you want to install or remove "
  1752.                         "\"Accessible Player\"?")
  1753.                 (help "")
  1754.                 (choices "Install" "Remove")
  1755.              )
  1756. )
  1757.  
  1758. (if askflag
  1759.     (Install)                       ;Start Install Procedure
  1760.     (Remove)                        ;Start Remove Procedure
  1761. )
  1762.